﻿using System;
using System.Collections.Generic;

namespace ChineseChessPieceRule
{
    class Program
    {
        static void Main(string[] args)
        {
            char[,] board = new char[,]
            {
                { 'r','n','b','a','k','a','b','n','r' },
                { '0','0','0','0','0','0','0','0','0' },
                { '0','c','0','0','0','0','0','c','0' },
                { 'p','0','p','0','p','0','p','0','p' },
                { '0','0','0','0','0','0','0','0','0' },
                { '0','0','0','0','0','0','0','0','0' },
                { 'P','0','P','0','P','0','P','0','P' },
                { '0','C','0','0','0','0','0','C','0' },
                { '0','0','0','0','0','0','0','0','0' },
                { 'R','N','B','A','K','A','B','N','R' },
            };

            List<int[]> result = PieceRule.GetPiecesMoves(board,"black");
            Console.WriteLine(result.Count);

            int i = 1;
            foreach(var item in result)
            {
                Console.WriteLine(i+" ==== "+string.Join(" ", item));
                i++;
            }


        }
    }
}
